package a66weding.com.jiehuntong.activity.home.adapter;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import java.util.List;

import a66weding.com.jiehuntong.R;
import a66weding.com.jiehuntong.adapter.MyBaseAdapter;
import a66weding.com.jiehuntong.beans.ForSearchBean;
import a66weding.com.jiehuntong.fragment.category.adapter.BusinessAdapter;

/**
 * Created by admin on 2016/8/9.
 */
public class ForSearchAdapter extends MyBaseAdapter {

    public ForSearchAdapter(Context context, List data) {
        super(context, data);
    }

    @Override
    public View getView(int position, View convertView, ViewGroup viewGroup) {
        ViewHolder vh;
        if (convertView==null){
            vh = new ViewHolder();
            convertView = View.inflate(context, R.layout.item_text,null);
            vh.tv = (TextView) convertView.findViewById(R.id.item_tv);
            convertView.setTag(vh);
        }else{
            vh = (ViewHolder) convertView.getTag();
        }
        ForSearchBean.DataBean  dataBean  = (ForSearchBean.DataBean) data.get(position);
        vh.tv.setText(dataBean.getKeywords());
        return  convertView;
    }

    public class ViewHolder {
        TextView tv;
    }

}
